package windowFactoryPackage;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class WriteReviewWindow extends WindowGenerator{
	static JButton submitButton;
	static JTextArea jta;
	private JPanel southPanel, centerPanel;
	Query q = new Query();
	
	public WriteReviewWindow(){
		setLayout(new BorderLayout());
		
		centerPanel = new JPanel(new BorderLayout());
		
		jta = new JTextArea();
		jta.setLineWrap(true);
		jta.setWrapStyleWord(true);
		
		centerPanel.add(jta, BorderLayout.CENTER);
		
		southPanel = new JPanel();
		southPanel.setBorder(BorderFactory.createEtchedBorder());
		
		submitButton = new JButton("Submit");
		submitButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				q.programComment();
				dispose();
			}
		});
		southPanel.add(submitButton);
		
		add(centerPanel, BorderLayout.CENTER);
		add(southPanel, BorderLayout.SOUTH);
	}
}
